import random
chips=int(1000)
while True:
    action=input("猜大小游戏：1.输入'大'或'小'进行游戏 2.输入'exit'退出游戏 3.输入'chips'查看筹码数，请输入：")
    if action=="大" or action=="小":
        dice1=random.randint(1,6)
        dice2=random.randint(1,6)
        dice3=random.randint(1,6)
        result=dice1+dice2+dice3
        if (action == "大" and result >= 11) or (action == "小" and result <= 11):
            chips+=100
            print(dice1,dice2,dice3)
            print("YOU WIN")
        else :
            chips-=100
            print(dice1,dice2,dice3)
            print("YOU LOSE")
        if chips<100:
            print("输光了")
            break
    if action=="exit":
        break
    if action=="chips":
        print("你的筹码还有%i" %chips)
    if action!="大" and action!="小" and action!="exit" and action!="chips":
        print("输入有误，请重新输入")